package com.aaa.behind.service.impl;

import com.aaa.behind.dao.NumberUserMapper;
import com.aaa.behind.service.NumberUserService;
import com.aaa.entity.BusinessSort;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class NumberUserServiceImpl implements NumberUserService {


    @Autowired
    private NumberUserMapper numberUserMapper;

    @Override
    public List<BusinessSort> NumberUser() {

        BusinessSort shangjia = numberUserMapper.countTUser();
        BusinessSort yonghu = numberUserMapper.countUUserInfo();
        yonghu.setName("用户");
        shangjia.setName("商家");
        List<BusinessSort> businessSorts = new ArrayList<>();
        businessSorts.add(yonghu);
        businessSorts.add(shangjia);
        return businessSorts;
    }
}
